/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * HelpJDialog.java
 *
 * Created on 08.05.2009, 10:52:24
 */

package morenoapp.components.common;

/**
 *
 * @author dmitry.mamonov
 */
public class HelpJDialog extends javax.swing.JDialog {

    /** Creates new form HelpJDialog */
    public HelpJDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPaneHelp = new javax.swing.JScrollPane();
        jTextPaneHelpContent = new javax.swing.JTextPane();
        jToolBarHelp = new javax.swing.JToolBar();
        jButtonIndex = new javax.swing.JButton();
        jButtonGoToProjectWebsite = new javax.swing.JButton();
        jButtonCloseHelp = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jScrollPaneHelp.setName("jScrollPaneHelp"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(morenoapp.MorenoApp.class).getContext().getResourceMap(HelpJDialog.class);
        jTextPaneHelpContent.setContentType(resourceMap.getString("jTextPaneHelpContent.contentType")); // NOI18N
        jTextPaneHelpContent.setEditable(false);
        jTextPaneHelpContent.setName("jTextPaneHelpContent"); // NOI18N
        jScrollPaneHelp.setViewportView(jTextPaneHelpContent);

        jToolBarHelp.setFloatable(false);
        jToolBarHelp.setRollover(true);
        jToolBarHelp.setName("jToolBarHelp"); // NOI18N

        jButtonIndex.setIcon(resourceMap.getIcon("<html><u>jButtonIndex.icon")); // NOI18N
        jButtonIndex.setText(resourceMap.getString("jButtonIndex.text")); // NOI18N
        jButtonIndex.setFocusable(false);
        jButtonIndex.setName("<html><u>jButtonIndex"); // NOI18N
        jToolBarHelp.add(jButtonIndex);

        jButtonGoToProjectWebsite.setText(resourceMap.getString("jButtonGoToProjectWebsite.text")); // NOI18N
        jButtonGoToProjectWebsite.setFocusable(false);
        jButtonGoToProjectWebsite.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonGoToProjectWebsite.setName("jButtonGoToProjectWebsite"); // NOI18N
        jButtonGoToProjectWebsite.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBarHelp.add(jButtonGoToProjectWebsite);

        jButtonCloseHelp.setText(resourceMap.getString("jButtonCloseHelp.text")); // NOI18N
        jButtonCloseHelp.setFocusable(false);
        jButtonCloseHelp.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonCloseHelp.setName("jButtonCloseHelp"); // NOI18N
        jButtonCloseHelp.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBarHelp.add(jButtonCloseHelp);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBarHelp, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)
            .addComponent(jScrollPaneHelp, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBarHelp, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPaneHelp, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                HelpJDialog dialog = new HelpJDialog(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonCloseHelp;
    private javax.swing.JButton jButtonGoToProjectWebsite;
    private javax.swing.JButton jButtonIndex;
    private javax.swing.JScrollPane jScrollPaneHelp;
    private javax.swing.JTextPane jTextPaneHelpContent;
    private javax.swing.JToolBar jToolBarHelp;
    // End of variables declaration//GEN-END:variables

}
